package com.lcm.springcloud.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author: Coder-Lcm
 * @date: 2020/10/28 13:05
 */
@RestController
public class OrderConsulController {

    public static final String INVOKE_URL = "http://cloud-provider-consul-payment";

    @Resource
    RestTemplate restTemplate;

    @GetMapping("/consumer/payment/consul")
    public String paymentInfo(){
        String r = restTemplate.getForObject(INVOKE_URL + "/payment/consul", String.class);
        return r;
    }

}
